/**
  ******************************************************************************
  * @file    controller_protocol.h
  ******************************************************************************
  */

#ifndef _CONTROLLER_PROTOCOL_H_
#define _CONTROLLER_PROTOCOL_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "controller_protocol_data_def.h"

/**
 * @brief init handle.
 *---
 * @param None.
 * @return do not free -1, free 0.
 * @see None.
 * @note None.
 */
int32_t con_linkkit_new(void);

/**
 * @brief free handle.
 *---
 * @param None.
 * @return do not free -1, free 0.
 * @see None.
 * @note None.
 */
int32_t con_linkkit_free(void);

/**
 * @brief reset handle.
 *---
 * @param None.
 * @return do not free -1, free 0.
 * @see None.
 * @note None.
 */
int32_t con_linkkit_reset(void);

/**
 * @brief yield.
 *---
 * @param None.
 * @return do not free -1, free 0.
 * @see None.
 * @note None.
 */
int32_t con_yield(void);

/**
 * @brief 发送桩数据到控制器.
 *---
 * @param [in] event_type: @n the event you want to send.
 * @param [in] param: @n the event data will be written.
 * @return None.
 * @see None.
 * @note None.
 */
void con_send_data(con_pduformat_enum frame_type, void *param);

#ifdef __cplusplus
}
#endif

#endif /* _CONTROLLER_PROTOCOL_H_ */
